Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

344
Visualizações
How to login 2 websites at the same time? | how to login with wp REST API out of Wordpress site?

I built 2 websites. One is Codeigniter(localhost/test) and other one is Wordpress(localhost/sample). If I login in the first site (e.g: localhost/test), there is no need to login in the second site again. So I want to login 2 websites at the same time within one login action. I tried as following. That is my code.

<!DOCTYPE html>
<html lang="en">    
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <head>
        <!-- Title -->
        <title>Test</title>
        <!-- Required Meta Tags Always Come First -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    </head>

    <body>
        <form action="http://localhost/sample/wp-json/wp/v2/users" method="post">  //--> target site URL
            <div class="form-group">
                <label for="email">Username:</label>
                <input type="text" class="form-control" name="username" placeholder="Enter username" id="username">
            </div>
            <div class="form-group">
                <label for="email">Email address:</label>
                <input type="email" class="form-control" name="email" placeholder="Enter email" id="email">
            </div>
            <div class="form-group">
                <label for="pwd">Password:</label>
                <input type="password" class="form-control" name="password" placeholder="Enter password" id="password">
            </div>
            <button type="submit" class="btn btn-primary">Submit</button>    
        </form>        
    </body>
</html>

If I click the submit, entered parameter transferred to the target site URL, and I got the following error.

Error Screenshot enter image description here

Target site URL("http://localhost/sample/wp-json/wp/v2/users") is Wordpress REST API. Is it possible to proceed this ?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda